package com.yq.design.responsibility;

/**
 * @ClassName Client
 * @Description 需求：采购员采购器材，有0-5 教学主任审批，5-10由院长审批，10-30副校长审批 30以上校长审批
 * @Author yaoqiang
 * @Date 2021/8/25 10:49
 * @Version 1.0
 */
public class Client {
    public static void main(String[] args) {
        PurchaseRequest p = new PurchaseRequest(1, 3, 1);
        //创建相关审批人
        DepartmentApprover d = new DepartmentApprover("d");
        CollegeApprover co = new CollegeApprover("co");
        SchoolMasterApprover sc = new SchoolMasterApprover("sc");

        d.setApprover(co);
        co.setApprover(sc);
        sc.setApprover(d);

        d.processRequest(p);



    }
}
